package com.jiangyao.model.dto.backend;

import com.jiangyao.model.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 试题DTO
 *
 * @author: yangyongchuan
 * @create: 2020年08月21日 00:04
 */
@ApiModel("试题DTO")
@Data
public class QuestionDTO implements BaseDTO {
	private static final long serialVersionUID = 57251647236496263L;

	/**
	 * 试题ID
	 */
	@ApiModelProperty("试题ID")
	@NotNull(message = "试题ID不能为空", groups = {Edit.class, Detail.class})
	private Integer questionId;

	/**
	 * 试题ID集合
	 */
	@ApiModelProperty("试题ID集合")
	private List<Integer> questionIdList;

	/**
	 * 分类
	 */
	@ApiModelProperty("分类")
	@NotNull(message = "分类不能为空", groups = {Add.class, Edit.class})
	private Integer categoryId;

	/**
	 * 试题名称
	 */
	@ApiModelProperty("试题名称")
	@NotNull(message = "试题名称不能为空", groups = {Add.class, Edit.class})
	@NotEmpty(message = "试题名称不能为空", groups = {Add.class, Edit.class})
	private String questionName;

	/**
	 * 默认通过试题的得分
	 */
	@ApiModelProperty(value = "默认通过试题的得分", example = "0")
	private Integer questionScore = 0;

	/**
	 * 状态 1 启用 2 无效
	 */
	@ApiModelProperty(value = "状态 1启用 0 关闭", example = "1")
	private Integer status;

}
